<template>
  <div class="common-layout">
    <el-container style="height: 100%;">
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer>
        <el-menu :default-active="activeIndex" mode="horizontal" router>
          <el-menu-item index="/search">
            <el-icon>
              <HomeFilled/>
            </el-icon>
          </el-menu-item>
          <el-menu-item index="/deliver">
            <el-icon>
              <CirclePlusFilled/>
            </el-icon>
          </el-menu-item>
          <el-menu-item index="userinfo">
            <el-icon>
              <UserFilled/>
            </el-icon>
          </el-menu-item>
        </el-menu>
      </el-footer>
    </el-container>
  </div>
</template>
<script setup>
import {ref} from "vue"
import {CirclePlusFilled, HomeFilled, UserFilled} from "@element-plus/icons-vue";

const activeIndex = ref('0')


</script>
<style lang='less' scoped>
.common-layout {
  height: 100%;
  width: 100%;

  .el-header {
    padding: 0;
  }

  .el-main {
    padding: 0;
  }

  .el-footer {
    position: fixed;
    width: 100%;
    bottom: 0;
    padding: 0;
    z-index: 100;


    .el-menu {
      height: 100%;
      width: 100%;
      justify-content: space-around;
    }
  }
}
</style>
